package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;

import java.util.Date;
import java.util.List;


/**
 * The persistent class for the inhospital_storage database table.
 * 
 */
@Entity
@Table(name="inhospital_storage")
@NamedQuery(name="InhospitalStorage.findAll", query="SELECT i FROM InhospitalStorage i")
public class InhospitalStorage implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="inhospital__storage_id")
	private int inhospitalStorageId;

	@Column(name="inhospital__pici")
	private int inhospitalPici;

	@Column(name="inhospital__storage_amount")
	private int inhospitalStorageAmount;
	
	@Column(name="inhospital_storage_startdate")
	private String  inhospitalStorageStartdate;
	
	@Column(name="inhospital_storage_usedate")
	private String  inhospitalStorageUsedate;
	
	//bi-directional many-to-one association to Drug
	@ManyToOne
	@JoinColumn(name="drug_number")
	private Drug drug;

	//bi-directional many-to-one association to Pandian
	@OneToMany(mappedBy="inhospitalStorage")
	private List<Pandian> pandians;

	@Column(name="inhosp_samallstorage")
	private int inhospSamallstorage;
	
	@Column(name="inhosp_sate")
	private int inhospSate;
	
	public InhospitalStorage() {
	}

	
	
	public int getInhospSamallstorage() {
		return inhospSamallstorage;
	}



	public void setInhospSamallstorage(int inhospSamallstorage) {
		this.inhospSamallstorage = inhospSamallstorage;
	}



	public int getInhospSate() {
		return inhospSate;
	}



	public void setInhospSate(int inhospSate) {
		this.inhospSate = inhospSate;
	}



	public int getInhospitalStorageId() {
		return this.inhospitalStorageId;
	}

	public void setInhospitalStorageId(int inhospitalStorageId) {
		this.inhospitalStorageId = inhospitalStorageId;
	}

	public int getInhospitalPici() {
		return this.inhospitalPici;
	}

	public void setInhospitalPici(int inhospitalPici) {
		this.inhospitalPici = inhospitalPici;
	}

	public int getInhospitalStorageAmount() {
		return this.inhospitalStorageAmount;
	}

	public void setInhospitalStorageAmount(int inhospitalStorageAmount) {
		this.inhospitalStorageAmount = inhospitalStorageAmount;
	}

	public Drug getDrug() {
		return this.drug;
	}

	public void setDrug(Drug drug) {
		this.drug = drug;
	}

	public List<Pandian> getPandians() {
		return this.pandians;
	}

	public void setPandians(List<Pandian> pandians) {
		this.pandians = pandians;
	}

	public Pandian addPandian(Pandian pandian) {
		getPandians().add(pandian);
		pandian.setInhospitalStorage(this);

		return pandian;
	}

	public Pandian removePandian(Pandian pandian) {
		getPandians().remove(pandian);
		pandian.setInhospitalStorage(null);

		return pandian;
	}

	public String getInhospitalStorageStartdate() {
		return inhospitalStorageStartdate;
	}

	public void setInhospitalStorageStartdate(String inhospitalStorageStartdate) {
		this.inhospitalStorageStartdate = inhospitalStorageStartdate;
	}

	public String getInhospitalStorageUsedate() {
		return inhospitalStorageUsedate;
	}

	public void setInhospitalStorageUsedate(String inhospitalStorageUsedate) {
		this.inhospitalStorageUsedate = inhospitalStorageUsedate;
	}
}